package top.dingwen.io.treasure.websocket.constant;

import top.dingwen.io.treasure.base.constant.IConstant;
import top.dingwen.io.treasure.base.constant.SupWarsConstant;

/**
 * WebsocketConstant : Websocket场景常量类
 *
 * @author dingwen
 * @since 2024/7/18 10:23
 */
@SuppressWarnings(SupWarsConstant.UNUSED)
public final class WebSocketConstant implements IConstant {


    /**
     * 日志打印前缀
     */
    public static final String WS_L_O_S = "[websocket]WebSocket场景启动器";
    public static final String WS_L_H = "[WebSocketHandler]连接处理器";
    public static final String WS_L_U = "[WebSocketUtils]WebSocket工具类";
    public static final String WS_L_TL = "[WebSocketTopicListener]WebSocket主题监听器";
    public static final String WS_L_C = "[WebSocketConfigurer]WebSocket服务配置";
    public static final String WS_L_I = "[WebSocketInterceptor]WebSocket拦截器";
    public static final String WS_L_API = "[WebSocketIndexController]WebSocket默认API";
    public static final String WS_L_HB_CJ = "[HeartbeatCheckJob]心跳检测任务";
    public static final String WS_L_D_RMC = "[DefaultReceiveMsgCall]默认接收消息回调";
    public static final String WS_L_D_SMC = "[DefaultSendMsgCall]默认发送消息回调";

    /**
     * websocketSession中的登录编号参数的key
     */
    public static final String LOGIN_ID_KEY = "loginId";

    /**
     * 发送的登录编号参数的key
     */
    public static final String SEND_LOGIN_ID_KEY = "sendLoginId";

    /**
     * websocketSession中的登录名称参数的key
     */
    public static final String LOGIN_NAME_KEY = "loginName";

    /**
     * 订阅的频道
     */
    public static final String WEB_SOCKET_TOPIC = "treasure:websocket:global";

    /**
     * 前端心跳检查的命令
     */
    public static final String PING = "ping";

    /**
     * 服务端心跳恢复的字符串
     */
    public static final String PONG = "pong";

    /**
     * websocket 默认路径
     */
    public static final String DEFAULT_WS = "/websocket";
}
